package com.wjh.yygh.oss.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantCosUtils implements InitializingBean {

    @Value("${tengxun.cos.region}")
    private String region;

    @Value("${tengxun.cos.SecretKey}")
    private String secretKey;

    @Value("${tengxun.cos.SecretId}")
    private String secretId;

    @Value("${tengxun.cos.bucketName}")
    private String bucketName;

    public static String REGION;
    public static String SECRETKEY;
    public static String SECRETID;
    public static String BUCKETNAME;

    @Override
    public void afterPropertiesSet() throws Exception {
        REGION=region;
        SECRETKEY=secretKey;
        SECRETID=secretId;
        BUCKETNAME=bucketName;
    }


}
